package vn.smartoffice.promail.dto;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.TreeNode;

import vn.smartoffice.promail.entity.MailContactGroup;

public class MailContactGroupNode extends DefaultTreeNode<MailContactGroup> {

	private static final long serialVersionUID = 6485953937208469291L;

	public MailContactGroupNode(MailContactGroup data) {
		super(data, Collections.<TreeNode<MailContactGroup>> emptyList());
	}

	public MailContactGroupNode(MailContactGroup data, Collection<MailContactGroupNode> children) {
		super(data, children);
	}

	@SuppressWarnings("unchecked")
	public List<MailContactGroupNode> getChildrenNode() {
		return (List) getChildren();
	}

	public long getId() {
		return getData().getId();
	}

	public Long getParentId() {
		return getData().getParentId();
	}

}
